package com.atomscat.lottery.entity.db;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@Entity(name = "t_user_identity")
@Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"number_md", "type"})})
public class UserIdentityEntity extends Auditable<UserEntity, Long> implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Column(length = 64)
    private String number;

    @Column(length = 32)
    private String numberMd;

    @Column(length = 8)
    private String type;

    private Date effectDate;

    private Date expiryDate;

    @Column(length = 2)
    private String state;

}
